-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch: Completely remove aria-checked
from switch, set id
on input
to be the same as label
, replace brittle unit test with more precise e2e test
#2455
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for moduswebcomponents ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
aria-checked
from switch, set id
on input
to be the same as label
, replace brittle unit test with more precise e2e testaria-checked
from switch, set id
on input
to be the same as label
, replace brittle unit test with more precise e2e test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be great when it's finished - but it's not quite right yet.
- The label is not matching the id.
- When the switch is checked the input should have the
checked
attribute - id name should assigned automatically with something like
mwc_id_0_switch_input
like do for text-inputs (<label for="mwc_id_0_text_input">Username</label>
)
I've fixed the other two issues. |
oh, found a bug. Clicking on the label should change the state like this: |
Description
Completely remove
aria-checked
from switch, setid
oninput
to be the same aslabel
, replace brittle unit test with more precise e2e testReferences #2450
Type of change
How Has This Been Tested?
https://deploy-preview-2455--moduswebcomponents.netlify.app/?path=/story/user-inputs-switch--medium
Checklist